import request from '@/utils/request'

// 查询商品分类列表
export function listGoodClass(query) {
  return request({
    url: '/lkshop/goodclass/list',
    method: 'get',
    params: query
  })
}

// 查询商品分类详细
export function getGoodClass(classId) {
  return request({
    url: '/lkshop/goodclass/' + classId,
    method: 'get'
  })
}

// 新增商品分类
export function addGoodClass(data) {
  return request({
    url: '/lkshop/goodclass',
    method: 'post',
    data: data
  })
}

// 修改商品分类
export function updateGoodClass(data) {
  return request({
    url: '/lkshop/goodclass',
    method: 'put',
    data: data
  })
}

// 删除商品分类
export function delGoodClass(classId) {
  return request({
    url: '/lkshop/goodclass/' + classId,
    method: 'delete'
  })
}

// 获取商品分类树形结构
export function getGoodClassTree(query) {
  return request({
    url: '/lkshop/goodclass/tree',
    method: 'get',
    params: query
  })
} 